package com.cxb.controller;

import com.cxb.FeignTest;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/cxb/feign")
@RequiredArgsConstructor
public class FeignController{

    private final FeignTest feignTest;

    @GetMapping("/test")
    public void test(){
         feignTest.test();
        System.out.println("123");
    }

    public static void main(String[] args) {
        String s = "305476^305918^305882^310425^310468^310473^360558^";
        String[] ids = s.split("\\^");
        String rootId = ids[ids.length - 3];
        System.out.println(rootId);
    }

}
